An easy way to remember swarming is: The hive is full of Bees, Food, and Brood. The hive is pretty crowded so all the bees don't go into the hive at night. This reduces the chance of over heating. There is plenty of stored honey and pollen. Maybe, no more room for new food. The foraging bees get frustrate because the storage bees are not taking the nectar form them fast enough or at all. The foragers quit foraging and are just buzzing around the hive being impatient. The queen has laid all the eggs the space in the brood area will allow. She then stops laying new eggs making the nurse bees nervous.
The nurse bees start drawing queen cells because their old queen has "gone puny" and has stopped laying eggs. It takes 10 days for the old queen to slim down to aerodynamic shape. Now she flies away taking most all the flying bees with her.
The new queen cell is capped on day 11. That is about the day the old queen departs the hive. On day 16 the new queen hatches, having no competition with the old queen.
You can see here that by the time you find queen cells the process is so far along you may not be able to stop the swarming. Especially if the queen cells are capped. You have to come up with other management techniques to save the old queen. This involves some type of splitting and moving the old queen into a nuc.